3.51 \(\int (a+b \tan (e+f x))^2 (c+d \tan (e+f x)) (A+B \tan (e+f x)+C \tan ^2(e+f x)) \, dx\)

Optimal. Leaf size=248 \[ -\frac{\log (\cos (e+f x)) \left (a^2 (d (A-C)+B c)+2 a b (A c-B d-c C)-b^2 (d (A-C)+B c)\right )}{f}+x \left (a^2 (A c-B d-c C)-2 a b (d (A-C)+B c)-b^2 (A c-B d-c C)\right )+\frac{(d (A-C)+B c) (a+b \tan (e+f x))^2}{2 f}+\frac{b \tan (e+f x) (a A d+a B c-a C d+A b c-b B d-b c C)}{f}-\frac{(a C d-4 b (B d+c C)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f} \]

[Out]

(a^2*(A*c - c*C - B*d) - b^2*(A*c - c*C - B*d) - 2*a*b*(B*c + (A - C)*d))*x - ((2*a*b*(A*c - c*C - B*d) + a^2*
(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*Log[Cos[e + f*x]])/f + (b*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d -
a*C*d)*Tan[e + f*x])/f + ((B*c + (A - C)*d)*(a + b*Tan[e + f*x])^2)/(2*f) - ((a*C*d - 4*b*(c*C + B*d))*(a + b*
Tan[e + f*x])^3)/(12*b^2*f) + (C*d*Tan[e + f*x]*(a + b*Tan[e + f*x])^3)/(4*b*f)

________________________________________________________________________________________

Rubi [A]  time = 0.451264, antiderivative size = 248, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.116, Rules used = {3637, 3630, 3528, 3525, 3475} \[ -\frac{\log (\cos (e+f x)) \left (a^2 (d (A-C)+B c)+2 a b (A c-B d-c C)-b^2 (d (A-C)+B c)\right )}{f}+x \left (a^2 (A c-B d-c C)-2 a b (d (A-C)+B c)-b^2 (A c-B d-c C)\right )+\frac{(d (A-C)+B c) (a+b \tan (e+f x))^2}{2 f}+\frac{b \tan (e+f x) (a A d+a B c-a C d+A b c-b B d-b c C)}{f}-\frac{(a C d-4 b (B d+c C)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]

[Out]

(a^2*(A*c - c*C - B*d) - b^2*(A*c - c*C - B*d) - 2*a*b*(B*c + (A - C)*d))*x - ((2*a*b*(A*c - c*C - B*d) + a^2*
(B*c + (A - C)*d) - b^2*(B*c + (A - C)*d))*Log[Cos[e + f*x]])/f + (b*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d -
a*C*d)*Tan[e + f*x])/f + ((B*c + (A - C)*d)*(a + b*Tan[e + f*x])^2)/(2*f) - ((a*C*d - 4*b*(c*C + B*d))*(a + b*
Tan[e + f*x])^3)/(12*b^2*f) + (C*d*Tan[e + f*x]*(a + b*Tan[e + f*x])^3)/(4*b*f)

Rule 3637

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])
^(n + 1))/(d*f*(n + 2)), x] - Dist[1/(d*(n + 2)), Int[(c + d*Tan[e + f*x])^n*Simp[b*c*C - a*A*d*(n + 2) - (A*b
 + a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C*d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; F
reeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] &&  !LtQ[n, -1]

Rule 3630

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(C*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&&  !LeQ[m, -1]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+b \tan (e+f x))^2 (c+d \tan (e+f x)) \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx &=\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f}-\frac{\int (a+b \tan (e+f x))^2 \left (-4 A b c+a C d-4 b (B c+(A-C) d) \tan (e+f x)+(a C d-4 b (c C+B d)) \tan ^2(e+f x)\right ) \, dx}{4 b}\\ &=-\frac{(a C d-4 b (c C+B d)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f}-\frac{\int (a+b \tan (e+f x))^2 (-4 b (A c-c C-B d)-4 b (B c+(A-C) d) \tan (e+f x)) \, dx}{4 b}\\ &=\frac{(B c+(A-C) d) (a+b \tan (e+f x))^2}{2 f}-\frac{(a C d-4 b (c C+B d)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f}-\frac{\int (a+b \tan (e+f x)) (4 b (b B c+b (A-C) d-a (A c-c C-B d))-4 b (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)) \, dx}{4 b}\\ &=\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)-2 a b (B c+(A-C) d)\right ) x+\frac{b (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)}{f}+\frac{(B c+(A-C) d) (a+b \tan (e+f x))^2}{2 f}-\frac{(a C d-4 b (c C+B d)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f}-\left (-2 a b (A c-c C-B d)-a^2 (B c+(A-C) d)+b^2 (B c+(A-C) d)\right ) \int \tan (e+f x) \, dx\\ &=\left (a^2 (A c-c C-B d)-b^2 (A c-c C-B d)-2 a b (B c+(A-C) d)\right ) x-\frac{\left (2 a b (A c-c C-B d)+a^2 (B c+(A-C) d)-b^2 (B c+(A-C) d)\right ) \log (\cos (e+f x))}{f}+\frac{b (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)}{f}+\frac{(B c+(A-C) d) (a+b \tan (e+f x))^2}{2 f}-\frac{(a C d-4 b (c C+B d)) (a+b \tan (e+f x))^3}{12 b^2 f}+\frac{C d \tan (e+f x) (a+b \tan (e+f x))^3}{4 b f}\\ \end{align*}

Mathematica [C]  time = 3.17545, size = 243, normalized size = 0.98 \[ \frac{6 (d (A-C)+B c) \left (6 a b^2 \tan (e+f x)+(-b+i a)^3 \log (-\tan (e+f x)+i)-(b+i a)^3 \log (\tan (e+f x)+i)+b^3 \tan ^2(e+f x)\right )-6 (-a A d-a B c+a C d+A b c-b B d-b c C) \left (-2 b^2 \tan (e+f x)+i \left ((a+i b)^2 \log (-\tan (e+f x)+i)-(a-i b)^2 \log (\tan (e+f x)+i)\right )\right )+\frac{(4 b (B d+c C)-a C d) (a+b \tan (e+f x))^3}{b}+3 C d \tan (e+f x) (a+b \tan (e+f x))^3}{12 b f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^2*(c + d*Tan[e + f*x])*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]

[Out]

(((-(a*C*d) + 4*b*(c*C + B*d))*(a + b*Tan[e + f*x])^3)/b + 3*C*d*Tan[e + f*x]*(a + b*Tan[e + f*x])^3 - 6*(A*b*
c - a*B*c - b*c*C - a*A*d - b*B*d + a*C*d)*(I*((a + I*b)^2*Log[I - Tan[e + f*x]] - (a - I*b)^2*Log[I + Tan[e +
 f*x]]) - 2*b^2*Tan[e + f*x]) + 6*(B*c + (A - C)*d)*((I*a - b)^3*Log[I - Tan[e + f*x]] - (I*a + b)^3*Log[I + T
an[e + f*x]] + 6*a*b^2*Tan[e + f*x] + b^3*Tan[e + f*x]^2))/(12*b*f)

________________________________________________________________________________________

Maple [B]  time = 0.017, size = 631, normalized size = 2.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x)

[Out]

1/2/f*ln(1+tan(f*x+e)^2)*C*b^2*d+1/f*A*arctan(tan(f*x+e))*a^2*c-1/2/f*C*tan(f*x+e)^2*b^2*d+1/f*A*b^2*c*tan(f*x
+e)+1/2/f*A*tan(f*x+e)^2*b^2*d-1/2/f*ln(1+tan(f*x+e)^2)*B*b^2*c+1/f*B*a^2*d*tan(f*x+e)+1/4/f*C*b^2*d*tan(f*x+e
)^4+1/3/f*B*tan(f*x+e)^3*b^2*d+1/3/f*C*tan(f*x+e)^3*b^2*c+1/2/f*B*tan(f*x+e)^2*b^2*c+1/2/f*C*tan(f*x+e)^2*a^2*
d+1/f*B*arctan(tan(f*x+e))*b^2*d-1/f*C*arctan(tan(f*x+e))*a^2*c+1/f*C*arctan(tan(f*x+e))*b^2*c-1/2/f*ln(1+tan(
f*x+e)^2)*C*a^2*d-1/f*C*b^2*c*tan(f*x+e)+1/2/f*ln(1+tan(f*x+e)^2)*A*a^2*d-1/2/f*ln(1+tan(f*x+e)^2)*A*b^2*d+1/2
/f*ln(1+tan(f*x+e)^2)*B*a^2*c-1/f*B*arctan(tan(f*x+e))*a^2*d-1/f*B*b^2*d*tan(f*x+e)+1/f*C*a^2*c*tan(f*x+e)+1/f
*C*tan(f*x+e)^2*a*b*c-2/f*A*arctan(tan(f*x+e))*a*b*d+1/f*ln(1+tan(f*x+e)^2)*A*a*b*c+2/f*C*arctan(tan(f*x+e))*a
*b*d-1/f*ln(1+tan(f*x+e)^2)*C*a*b*c+1/f*B*tan(f*x+e)^2*a*b*d+2/f*A*a*b*d*tan(f*x+e)-2/f*B*arctan(tan(f*x+e))*a
*b*c-1/f*ln(1+tan(f*x+e)^2)*B*a*b*d-1/f*A*arctan(tan(f*x+e))*b^2*c+2/f*B*a*b*c*tan(f*x+e)-2/f*C*a*b*d*tan(f*x+
e)+2/3/f*C*tan(f*x+e)^3*a*b*d

________________________________________________________________________________________

Maxima [A]  time = 1.49138, size = 370, normalized size = 1.49 \begin{align*} \frac{3 \, C b^{2} d \tan \left (f x + e\right )^{4} + 4 \,{\left (C b^{2} c +{\left (2 \, C a b + B b^{2}\right )} d\right )} \tan \left (f x + e\right )^{3} + 6 \,{\left ({\left (2 \, C a b + B b^{2}\right )} c +{\left (C a^{2} + 2 \, B a b +{\left (A - C\right )} b^{2}\right )} d\right )} \tan \left (f x + e\right )^{2} + 12 \,{\left ({\left ({\left (A - C\right )} a^{2} - 2 \, B a b -{\left (A - C\right )} b^{2}\right )} c -{\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} d\right )}{\left (f x + e\right )} + 6 \,{\left ({\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} c +{\left ({\left (A - C\right )} a^{2} - 2 \, B a b -{\left (A - C\right )} b^{2}\right )} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 12 \,{\left ({\left (C a^{2} + 2 \, B a b +{\left (A - C\right )} b^{2}\right )} c +{\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} d\right )} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

1/12*(3*C*b^2*d*tan(f*x + e)^4 + 4*(C*b^2*c + (2*C*a*b + B*b^2)*d)*tan(f*x + e)^3 + 6*((2*C*a*b + B*b^2)*c + (
C*a^2 + 2*B*a*b + (A - C)*b^2)*d)*tan(f*x + e)^2 + 12*(((A - C)*a^2 - 2*B*a*b - (A - C)*b^2)*c - (B*a^2 + 2*(A
 - C)*a*b - B*b^2)*d)*(f*x + e) + 6*((B*a^2 + 2*(A - C)*a*b - B*b^2)*c + ((A - C)*a^2 - 2*B*a*b - (A - C)*b^2)
*d)*log(tan(f*x + e)^2 + 1) + 12*((C*a^2 + 2*B*a*b + (A - C)*b^2)*c + (B*a^2 + 2*(A - C)*a*b - B*b^2)*d)*tan(f
*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.21043, size = 608, normalized size = 2.45 \begin{align*} \frac{3 \, C b^{2} d \tan \left (f x + e\right )^{4} + 4 \,{\left (C b^{2} c +{\left (2 \, C a b + B b^{2}\right )} d\right )} \tan \left (f x + e\right )^{3} + 12 \,{\left ({\left ({\left (A - C\right )} a^{2} - 2 \, B a b -{\left (A - C\right )} b^{2}\right )} c -{\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} d\right )} f x + 6 \,{\left ({\left (2 \, C a b + B b^{2}\right )} c +{\left (C a^{2} + 2 \, B a b +{\left (A - C\right )} b^{2}\right )} d\right )} \tan \left (f x + e\right )^{2} - 6 \,{\left ({\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} c +{\left ({\left (A - C\right )} a^{2} - 2 \, B a b -{\left (A - C\right )} b^{2}\right )} d\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 12 \,{\left ({\left (C a^{2} + 2 \, B a b +{\left (A - C\right )} b^{2}\right )} c +{\left (B a^{2} + 2 \,{\left (A - C\right )} a b - B b^{2}\right )} d\right )} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

1/12*(3*C*b^2*d*tan(f*x + e)^4 + 4*(C*b^2*c + (2*C*a*b + B*b^2)*d)*tan(f*x + e)^3 + 12*(((A - C)*a^2 - 2*B*a*b
 - (A - C)*b^2)*c - (B*a^2 + 2*(A - C)*a*b - B*b^2)*d)*f*x + 6*((2*C*a*b + B*b^2)*c + (C*a^2 + 2*B*a*b + (A -
C)*b^2)*d)*tan(f*x + e)^2 - 6*((B*a^2 + 2*(A - C)*a*b - B*b^2)*c + ((A - C)*a^2 - 2*B*a*b - (A - C)*b^2)*d)*lo
g(1/(tan(f*x + e)^2 + 1)) + 12*((C*a^2 + 2*B*a*b + (A - C)*b^2)*c + (B*a^2 + 2*(A - C)*a*b - B*b^2)*d)*tan(f*x
 + e))/f

________________________________________________________________________________________

Sympy [A]  time = 1.88886, size = 617, normalized size = 2.49 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**2*(c+d*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)**2),x)

[Out]

Piecewise((A*a**2*c*x + A*a**2*d*log(tan(e + f*x)**2 + 1)/(2*f) + A*a*b*c*log(tan(e + f*x)**2 + 1)/f - 2*A*a*b
*d*x + 2*A*a*b*d*tan(e + f*x)/f - A*b**2*c*x + A*b**2*c*tan(e + f*x)/f - A*b**2*d*log(tan(e + f*x)**2 + 1)/(2*
f) + A*b**2*d*tan(e + f*x)**2/(2*f) + B*a**2*c*log(tan(e + f*x)**2 + 1)/(2*f) - B*a**2*d*x + B*a**2*d*tan(e +
f*x)/f - 2*B*a*b*c*x + 2*B*a*b*c*tan(e + f*x)/f - B*a*b*d*log(tan(e + f*x)**2 + 1)/f + B*a*b*d*tan(e + f*x)**2
/f - B*b**2*c*log(tan(e + f*x)**2 + 1)/(2*f) + B*b**2*c*tan(e + f*x)**2/(2*f) + B*b**2*d*x + B*b**2*d*tan(e +
f*x)**3/(3*f) - B*b**2*d*tan(e + f*x)/f - C*a**2*c*x + C*a**2*c*tan(e + f*x)/f - C*a**2*d*log(tan(e + f*x)**2
+ 1)/(2*f) + C*a**2*d*tan(e + f*x)**2/(2*f) - C*a*b*c*log(tan(e + f*x)**2 + 1)/f + C*a*b*c*tan(e + f*x)**2/f +
 2*C*a*b*d*x + 2*C*a*b*d*tan(e + f*x)**3/(3*f) - 2*C*a*b*d*tan(e + f*x)/f + C*b**2*c*x + C*b**2*c*tan(e + f*x)
**3/(3*f) - C*b**2*c*tan(e + f*x)/f + C*b**2*d*log(tan(e + f*x)**2 + 1)/(2*f) + C*b**2*d*tan(e + f*x)**4/(4*f)
 - C*b**2*d*tan(e + f*x)**2/(2*f), Ne(f, 0)), (x*(a + b*tan(e))**2*(c + d*tan(e))*(A + B*tan(e) + C*tan(e)**2)
, True))

________________________________________________________________________________________

Giac [B]  time = 8.41758, size = 8778, normalized size = 35.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^2*(c+d*tan(f*x+e))*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="giac")

[Out]

1/12*(12*A*a^2*c*f*x*tan(f*x)^4*tan(e)^4 - 12*C*a^2*c*f*x*tan(f*x)^4*tan(e)^4 - 24*B*a*b*c*f*x*tan(f*x)^4*tan(
e)^4 - 12*A*b^2*c*f*x*tan(f*x)^4*tan(e)^4 + 12*C*b^2*c*f*x*tan(f*x)^4*tan(e)^4 - 12*B*a^2*d*f*x*tan(f*x)^4*tan
(e)^4 - 24*A*a*b*d*f*x*tan(f*x)^4*tan(e)^4 + 24*C*a*b*d*f*x*tan(f*x)^4*tan(e)^4 + 12*B*b^2*d*f*x*tan(f*x)^4*ta
n(e)^4 - 6*B*a^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan
(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 12*A*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 -
 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 12*C*a
*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*ta
n(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 6*B*b^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*t
an(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 6*A*a^2*d*log(4*(tan(
e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) +
1))*tan(f*x)^4*tan(e)^4 + 6*C*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 12*B*a*b*d*log(4*(tan(e)^2 + 1)/(tan(
f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*
tan(e)^4 + 6*A*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + t
an(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 6*C*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2
- 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 48*A*
a^2*c*f*x*tan(f*x)^3*tan(e)^3 + 48*C*a^2*c*f*x*tan(f*x)^3*tan(e)^3 + 96*B*a*b*c*f*x*tan(f*x)^3*tan(e)^3 + 48*A
*b^2*c*f*x*tan(f*x)^3*tan(e)^3 - 48*C*b^2*c*f*x*tan(f*x)^3*tan(e)^3 + 48*B*a^2*d*f*x*tan(f*x)^3*tan(e)^3 + 96*
A*a*b*d*f*x*tan(f*x)^3*tan(e)^3 - 96*C*a*b*d*f*x*tan(f*x)^3*tan(e)^3 - 48*B*b^2*d*f*x*tan(f*x)^3*tan(e)^3 + 12
*C*a*b*c*tan(f*x)^4*tan(e)^4 + 6*B*b^2*c*tan(f*x)^4*tan(e)^4 + 6*C*a^2*d*tan(f*x)^4*tan(e)^4 + 12*B*a*b*d*tan(
f*x)^4*tan(e)^4 + 6*A*b^2*d*tan(f*x)^4*tan(e)^4 - 9*C*b^2*d*tan(f*x)^4*tan(e)^4 + 24*B*a^2*c*log(4*(tan(e)^2 +
 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*ta
n(f*x)^3*tan(e)^3 + 48*A*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*ta
n(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 48*C*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^
4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e
)^3 - 24*B*b^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f
*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 24*A*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2
*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 24*C*a^2
*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(
f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 48*B*a*b*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*ta
n(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 24*A*b^2*d*log(4*(tan(
e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) +
1))*tan(f*x)^3*tan(e)^3 + 24*C*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x
)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 12*C*a^2*c*tan(f*x)^4*tan(e)^3 - 24*
B*a*b*c*tan(f*x)^4*tan(e)^3 - 12*A*b^2*c*tan(f*x)^4*tan(e)^3 + 12*C*b^2*c*tan(f*x)^4*tan(e)^3 - 12*B*a^2*d*tan
(f*x)^4*tan(e)^3 - 24*A*a*b*d*tan(f*x)^4*tan(e)^3 + 24*C*a*b*d*tan(f*x)^4*tan(e)^3 + 12*B*b^2*d*tan(f*x)^4*tan
(e)^3 - 12*C*a^2*c*tan(f*x)^3*tan(e)^4 - 24*B*a*b*c*tan(f*x)^3*tan(e)^4 - 12*A*b^2*c*tan(f*x)^3*tan(e)^4 + 12*
C*b^2*c*tan(f*x)^3*tan(e)^4 - 12*B*a^2*d*tan(f*x)^3*tan(e)^4 - 24*A*a*b*d*tan(f*x)^3*tan(e)^4 + 24*C*a*b*d*tan
(f*x)^3*tan(e)^4 + 12*B*b^2*d*tan(f*x)^3*tan(e)^4 + 72*A*a^2*c*f*x*tan(f*x)^2*tan(e)^2 - 72*C*a^2*c*f*x*tan(f*
x)^2*tan(e)^2 - 144*B*a*b*c*f*x*tan(f*x)^2*tan(e)^2 - 72*A*b^2*c*f*x*tan(f*x)^2*tan(e)^2 + 72*C*b^2*c*f*x*tan(
f*x)^2*tan(e)^2 - 72*B*a^2*d*f*x*tan(f*x)^2*tan(e)^2 - 144*A*a*b*d*f*x*tan(f*x)^2*tan(e)^2 + 144*C*a*b*d*f*x*t
an(f*x)^2*tan(e)^2 + 72*B*b^2*d*f*x*tan(f*x)^2*tan(e)^2 + 12*C*a*b*c*tan(f*x)^4*tan(e)^2 + 6*B*b^2*c*tan(f*x)^
4*tan(e)^2 + 6*C*a^2*d*tan(f*x)^4*tan(e)^2 + 12*B*a*b*d*tan(f*x)^4*tan(e)^2 + 6*A*b^2*d*tan(f*x)^4*tan(e)^2 -
6*C*b^2*d*tan(f*x)^4*tan(e)^2 - 24*C*a*b*c*tan(f*x)^3*tan(e)^3 - 12*B*b^2*c*tan(f*x)^3*tan(e)^3 - 12*C*a^2*d*t
an(f*x)^3*tan(e)^3 - 24*B*a*b*d*tan(f*x)^3*tan(e)^3 - 12*A*b^2*d*tan(f*x)^3*tan(e)^3 + 24*C*b^2*d*tan(f*x)^3*t
an(e)^3 + 12*C*a*b*c*tan(f*x)^2*tan(e)^4 + 6*B*b^2*c*tan(f*x)^2*tan(e)^4 + 6*C*a^2*d*tan(f*x)^2*tan(e)^4 + 12*
B*a*b*d*tan(f*x)^2*tan(e)^4 + 6*A*b^2*d*tan(f*x)^2*tan(e)^4 - 6*C*b^2*d*tan(f*x)^2*tan(e)^4 - 4*C*b^2*c*tan(f*
x)^4*tan(e) - 8*C*a*b*d*tan(f*x)^4*tan(e) - 4*B*b^2*d*tan(f*x)^4*tan(e) - 36*B*a^2*c*log(4*(tan(e)^2 + 1)/(tan
(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2
*tan(e)^2 - 72*A*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
 tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 72*C*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)
^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 36
*B*b^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 36*A*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x
)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 36*C*a^2*d*log(4
*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan
(e) + 1))*tan(f*x)^2*tan(e)^2 + 72*B*a*b*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + t
an(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 36*A*b^2*d*log(4*(tan(e)^2 + 1
)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(
f*x)^2*tan(e)^2 - 36*C*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(
e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 36*C*a^2*c*tan(f*x)^3*tan(e)^2 + 72*B*a*b*c*
tan(f*x)^3*tan(e)^2 + 36*A*b^2*c*tan(f*x)^3*tan(e)^2 - 48*C*b^2*c*tan(f*x)^3*tan(e)^2 + 36*B*a^2*d*tan(f*x)^3*
tan(e)^2 + 72*A*a*b*d*tan(f*x)^3*tan(e)^2 - 96*C*a*b*d*tan(f*x)^3*tan(e)^2 - 48*B*b^2*d*tan(f*x)^3*tan(e)^2 +
36*C*a^2*c*tan(f*x)^2*tan(e)^3 + 72*B*a*b*c*tan(f*x)^2*tan(e)^3 + 36*A*b^2*c*tan(f*x)^2*tan(e)^3 - 48*C*b^2*c*
tan(f*x)^2*tan(e)^3 + 36*B*a^2*d*tan(f*x)^2*tan(e)^3 + 72*A*a*b*d*tan(f*x)^2*tan(e)^3 - 96*C*a*b*d*tan(f*x)^2*
tan(e)^3 - 48*B*b^2*d*tan(f*x)^2*tan(e)^3 - 4*C*b^2*c*tan(f*x)*tan(e)^4 - 8*C*a*b*d*tan(f*x)*tan(e)^4 - 4*B*b^
2*d*tan(f*x)*tan(e)^4 + 3*C*b^2*d*tan(f*x)^4 - 48*A*a^2*c*f*x*tan(f*x)*tan(e) + 48*C*a^2*c*f*x*tan(f*x)*tan(e)
 + 96*B*a*b*c*f*x*tan(f*x)*tan(e) + 48*A*b^2*c*f*x*tan(f*x)*tan(e) - 48*C*b^2*c*f*x*tan(f*x)*tan(e) + 48*B*a^2
*d*f*x*tan(f*x)*tan(e) + 96*A*a*b*d*f*x*tan(f*x)*tan(e) - 96*C*a*b*d*f*x*tan(f*x)*tan(e) - 48*B*b^2*d*f*x*tan(
f*x)*tan(e) - 24*C*a*b*c*tan(f*x)^3*tan(e) - 12*B*b^2*c*tan(f*x)^3*tan(e) - 12*C*a^2*d*tan(f*x)^3*tan(e) - 24*
B*a*b*d*tan(f*x)^3*tan(e) - 12*A*b^2*d*tan(f*x)^3*tan(e) + 24*C*b^2*d*tan(f*x)^3*tan(e) + 24*C*a*b*c*tan(f*x)^
2*tan(e)^2 + 12*B*b^2*c*tan(f*x)^2*tan(e)^2 + 12*C*a^2*d*tan(f*x)^2*tan(e)^2 + 24*B*a*b*d*tan(f*x)^2*tan(e)^2
+ 12*A*b^2*d*tan(f*x)^2*tan(e)^2 - 12*C*b^2*d*tan(f*x)^2*tan(e)^2 - 24*C*a*b*c*tan(f*x)*tan(e)^3 - 12*B*b^2*c*
tan(f*x)*tan(e)^3 - 12*C*a^2*d*tan(f*x)*tan(e)^3 - 24*B*a*b*d*tan(f*x)*tan(e)^3 - 12*A*b^2*d*tan(f*x)*tan(e)^3
 + 24*C*b^2*d*tan(f*x)*tan(e)^3 + 3*C*b^2*d*tan(e)^4 + 4*C*b^2*c*tan(f*x)^3 + 8*C*a*b*d*tan(f*x)^3 + 4*B*b^2*d
*tan(f*x)^3 + 24*B*a^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2
 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 48*A*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2
 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 48*C*a*b
*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(
f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 24*B*b^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
 + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 24*A*a^2*d*log(4*(tan(e)^2 + 1
)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(
f*x)*tan(e) - 24*C*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2
 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 48*B*a*b*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2
 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 24*A*b^2
*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(
f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 24*C*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
 + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 36*C*a^2*c*tan(f*x)^2*tan(e) -
 72*B*a*b*c*tan(f*x)^2*tan(e) - 36*A*b^2*c*tan(f*x)^2*tan(e) + 48*C*b^2*c*tan(f*x)^2*tan(e) - 36*B*a^2*d*tan(f
*x)^2*tan(e) - 72*A*a*b*d*tan(f*x)^2*tan(e) + 96*C*a*b*d*tan(f*x)^2*tan(e) + 48*B*b^2*d*tan(f*x)^2*tan(e) - 36
*C*a^2*c*tan(f*x)*tan(e)^2 - 72*B*a*b*c*tan(f*x)*tan(e)^2 - 36*A*b^2*c*tan(f*x)*tan(e)^2 + 48*C*b^2*c*tan(f*x)
*tan(e)^2 - 36*B*a^2*d*tan(f*x)*tan(e)^2 - 72*A*a*b*d*tan(f*x)*tan(e)^2 + 96*C*a*b*d*tan(f*x)*tan(e)^2 + 48*B*
b^2*d*tan(f*x)*tan(e)^2 + 4*C*b^2*c*tan(e)^3 + 8*C*a*b*d*tan(e)^3 + 4*B*b^2*d*tan(e)^3 + 12*A*a^2*c*f*x - 12*C
*a^2*c*f*x - 24*B*a*b*c*f*x - 12*A*b^2*c*f*x + 12*C*b^2*c*f*x - 12*B*a^2*d*f*x - 24*A*a*b*d*f*x + 24*C*a*b*d*f
*x + 12*B*b^2*d*f*x + 12*C*a*b*c*tan(f*x)^2 + 6*B*b^2*c*tan(f*x)^2 + 6*C*a^2*d*tan(f*x)^2 + 12*B*a*b*d*tan(f*x
)^2 + 6*A*b^2*d*tan(f*x)^2 - 6*C*b^2*d*tan(f*x)^2 - 24*C*a*b*c*tan(f*x)*tan(e) - 12*B*b^2*c*tan(f*x)*tan(e) -
12*C*a^2*d*tan(f*x)*tan(e) - 24*B*a*b*d*tan(f*x)*tan(e) - 12*A*b^2*d*tan(f*x)*tan(e) + 24*C*b^2*d*tan(f*x)*tan
(e) + 12*C*a*b*c*tan(e)^2 + 6*B*b^2*c*tan(e)^2 + 6*C*a^2*d*tan(e)^2 + 12*B*a*b*d*tan(e)^2 + 6*A*b^2*d*tan(e)^2
 - 6*C*b^2*d*tan(e)^2 - 6*B*a^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2
*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 12*A*a*b*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*ta
n(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 12*C*a*b*c*log(4*(tan(e)^2 + 1)
/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 6*B
*b^2*c*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*
tan(f*x)*tan(e) + 1)) - 6*A*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2
*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 6*C*a^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan
(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 12*B*a*b*d*log(4*(tan(e)^2 + 1)/
(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 6*A*
b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*t
an(f*x)*tan(e) + 1)) - 6*C*b^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*
tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 12*C*a^2*c*tan(f*x) + 24*B*a*b*c*tan(f*x) + 12*A*b^2*c*tan(f
*x) - 12*C*b^2*c*tan(f*x) + 12*B*a^2*d*tan(f*x) + 24*A*a*b*d*tan(f*x) - 24*C*a*b*d*tan(f*x) - 12*B*b^2*d*tan(f
*x) + 12*C*a^2*c*tan(e) + 24*B*a*b*c*tan(e) + 12*A*b^2*c*tan(e) - 12*C*b^2*c*tan(e) + 12*B*a^2*d*tan(e) + 24*A
*a*b*d*tan(e) - 24*C*a*b*d*tan(e) - 12*B*b^2*d*tan(e) + 12*C*a*b*c + 6*B*b^2*c + 6*C*a^2*d + 12*B*a*b*d + 6*A*
b^2*d - 9*C*b^2*d)/(f*tan(f*x)^4*tan(e)^4 - 4*f*tan(f*x)^3*tan(e)^3 + 6*f*tan(f*x)^2*tan(e)^2 - 4*f*tan(f*x)*t
an(e) + f)